Skip to content

SetupUtils: pass chmod arguments to Runtime.exec as an array - #1126

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:fix/setuputils-chmod-exec-args
Sep 15, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:fix/setuputils-chmod-exec-args

Conversation

@vharseko

Copy link
Copy Markdown
Member

Runtime.exec(String) splits the concatenated command on whitespace, so a deployment URI containing spaces would be handed to /bin/chmod as several operands. Build the command as a String[] instead.

Closes CodeQL alert java/concatenated-command-line: https://github.com/OpenIdentityPlatform/OpenAM/security/code-scanning/394

Only affects the local ssoadm tools installer (com.sun.identity.tools.bundles.Main); no shell is involved either way, so this is hygiene rather than a security fix.

Runtime.exec(String) splits the concatenated command on whitespace, so a
deployment URI containing spaces would be handed to /bin/chmod as several
operands. Build the command as a String[] instead.

Closes CodeQL alert java/concatenated-command-line
https://github.com/OpenIdentityPlatform/OpenAM/security/code-scanning/394
@vharseko vharseko added java Pull requests that update java code security Security fix or hardening (CVE, GHSA, XSS/CSRF/SSRF) labels Sep 14, 2026
@vharseko
vharseko merged commit 6006c77 into OpenIdentityPlatform:master Sep 15, 2026
15 checks passed
@vharseko
vharseko deleted the fix/setuputils-chmod-exec-args branch September 15, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update java code security Security fix or hardening (CVE, GHSA, XSS/CSRF/SSRF)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants